.test-record-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;

  .tab-navigation {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 24px;
    height: 56px;

    .tab-item {
      padding: 16px 24px;
      cursor: pointer;
      border-bottom: 3px solid transparent;
      transition: all 0.3s;
      margin-right: 8px;

      span {
        font-size: 14px;
        color: #666;
        font-weight: 500;
      }

      &:hover {
        color: #1890ff;

        span {
          color: #1890ff;
        }
      }

      &.active {
        border-bottom-color: var(--btnBG);

        span {
          color: var(--btnBG);
          font-weight: 600;
        }
      }
    }

    .power-button {
      margin-left: auto;

      .ant-btn {
        background: var(--redLiner);
        font-size: 18px !important;
        color: #FFFFFF !important;
        border-color: transparent !important;
        font-weight: bold;
        border-radius: 8px;
        height: 56px;
        width: 260px;
      }
    }
  }

  .filter-section {
    background-color: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;

    .filter-row {
      display: flex;
      align-items: center;
      gap: 16px;
      flex-wrap: wrap;

      .filter-item {
        flex-shrink: 0;
      }

      .table-info {
        margin-left: auto;
        color: #666;
        font-size: 14px;
      }

      .action-buttons {
        display: flex;
        gap: 8px;
        margin-left: 16px;

        .ant-btn {
          border-color: #d9d9d9 !important;
          color: #000000 !important;
        }

        .icon-plus {
          color: #009999 !important;
          width: 18px;
          height: 18px;
        }
      }
    }
  }

  .table-section {
    flex: 1;
    padding: 16px 24px;
    overflow: hidden;

    :deep(.ant-table) {
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      table-layout: fixed;

      .ant-table-thead>tr>th {
        background-color: #fafafa;
        border-bottom: 1px solid #e8e8e8;
        font-weight: 600;
        color: #262626;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 0;
      }

      .ant-table-tbody>tr>td {
        border-bottom: 1px solid #f0f0f0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 0;
      }

      .ant-table-tbody>tr:hover>td {
        background-color: #f5f5f5;
      }
    }

    .sort-icon {
      margin-left: 4px;
      color: #1890ff;
      font-size: 12px;
    }
  }
}

// 响应式设计
@media (max-width: 1200px) {
  .test-record-wrapper {
    .filter-section {
      .filter-row {
        flex-direction: column;
        align-items: stretch;

        .filter-item {
          width: 100%;
        }

        .table-info,
        .action-buttons {
          margin-left: 0;
          margin-top: 16px;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .test-record-wrapper {
    .tab-navigation {
      padding: 0 16px;
      overflow-x: auto;

      .tab-item {
        padding: 12px 16px;
        white-space: nowrap;
      }
    }

    .filter-section,
    .table-section {
      padding: 16px;
    }
  }
}

// 导出弹窗样式
.test-record-wrapper {
  :deep(.ant-modal) {
    .ant-modal-content {
      border-radius: 12px;
      overflow: hidden;
    }

    .ant-modal-header {
      border-bottom: 1px solid #e8e8e8;
      padding: 20px 24px;

      .ant-modal-title {
        font-size: 18px;
        font-weight: 600;
        color: #262626;
      }
    }

    .ant-modal-body {
      padding: 24px;
    }
  }


}

.export-modal-content {




  .test-conclusion-section {
    margin-bottom: 24px;

    .section-title {
      font-weight: 600;
      color: #262626;
      margin-bottom: 12px;
      font-size: 14px;
    }

    .conclusion-textarea {
      border: 2px dashed #d9d9d9;
      border-radius: 8px;
      resize: none;

      &:focus {
        border-color: var(--btnBG);
        box-shadow: 0 0 0 2px rgba(114, 46, 209, 0.1);
      }
    }
  }

  .export-settings-section {
    margin-bottom: 24px;

    .settings-row {
      display: flex;
      gap: 16px;
      margin-bottom: 16px;

      &:last-child {
        margin-bottom: 0;
      }

      .setting-item {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 12px;

        .setting-label {
          font-weight: 600;
          color: #262626;
          font-size: 14px;
          white-space: nowrap;
          width: 120px;
        }

        :deep(.ant-input) {
          flex: 1;
        }

        .input-with-button {
          display: flex;
          gap: 8px;
          flex: 1;

          .ant-input {
            width: 230px;
            flex: none;
          }
        }
      }
    }
  }

  .export-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;

    .cancel-button {
      border-color: var(--btnBG);
      color: var(--btnBG);
      background-color: #fff;

      &:hover {
        border-color: #5a1d9e;
        color: #5a1d9e;
      }
    }

    .save-button {
      background-color: var(--btnBG);
      border-color: var(--btnBG);

      &:hover {
        background-color: #5a1d9e;
        border-color: #5a1d9e;
      }
    }
  }
}

.export-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.photo-section {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  margin-top: 24px;

  .photo-upload-area {
    flex-shrink: 0;

    :deep(.ant-upload) {
      .ant-upload-drag {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
      }

      .ant-upload-btn {
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
      }
    }

    .upload-box {
      width: 150px;
      height: 150px;
      border: 2px dashed #d9d9d9 !important;
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.3s;
      background: #fafafa;

      &:hover {
        border-color: var(--btnBG) !important;
        color: var(--btnBG);
        background: #f0f0ff;
      }

      .upload-icon {
        font-size: 24px;
        color: #bfbfbf;
        margin-bottom: 8px;
      }

      .upload-text {
        font-size: 12px;
        color: #666;
      }
    }
  }

  .photo-thumbnails {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;

    .photo-thumbnail {
      width: 150px;
      height: 150px;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid #e8e8e8;

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      :deep(.ant-image) {
        width: 100%;
        height: 100%;

        .ant-image-img {
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }
    }
  }
}